<template>
    <div class="aside-menu">
        <el-container>
            <el-aside width="150px">
                <el-menu default-active="Staff" @select="onSelect">
                    <el-menu-item index="Staff">
                        <span>管理人员</span>
                    </el-menu-item>
                    <el-menu-item index="Team">
                        <span>班组商</span>
                    </el-menu-item>
                    <el-menu-item index="Labor">
                        <span>劳务人员</span>
                    </el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>
                <component :is="Staff" v-if="value == 'Staff'" />
                <component :is="Team" v-if="value == 'Team'" />
                <component :is="Labor" v-if="value == 'Labor'" />
            </el-main>
        </el-container>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import Staff from './components/staff.vue';
import Team from './components/team.vue';
import Labor from '../labourers/index.vue';
const value = ref('Staff')
const onSelect = (data: any) => {
    value.value = data
}
</script>

<style scoped>

</style>